import wxy.ChainOfResponsibility.*;

public class Main {
    public static void main(String[] args) {
        PurchaseRequest computer = new PurchaseRequest(250000, 100, "电脑设备");
        Approver a = new Director("A");
        Approver b = new VicePresident("B");
        Approver c = new President("C");
        Approver d = new Congress("D");

        a.setSuccessor(b);
        b.setSuccessor(c);
        c.setSuccessor(d);

        a.processRequest(computer);

        PurchaseRequest printer = new PurchaseRequest(520000, 120, "打印机");
        a.processRequest(printer);

        PurchaseRequest officeChair = new PurchaseRequest(80000, 120, "办公椅");
        a.processRequest(officeChair);

        PurchaseRequest projector = new PurchaseRequest(30000, 300, "投影仪");
        a.processRequest(projector);
    }
}